﻿@model FriendlyURL.Web.UI.Models.CreateAliasModel

@{
    ViewBag.Title = "Create Alias";
    ViewBag.Styles =
      @"body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
      }

      .form-create {
        max-width: 400px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-create .form-create-heading,
      .form-create .checkbox {
        margin-bottom: 10px;
      }
      .form-create input[type='text'], 
      .form-create input[type='password'] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }";      
}

<section class="content">
    <br />
    <br />

    <div class="container">
        @Html.ValidationSummary(true, "Alias creation was unsuccessful. Please correct the errors and try again.", new { @class = "alert alert-error" })
        
        @using (Html.BeginForm("Create", "Alias", FormMethod.Post, new { @class="form-create"})) {
        

                <h2 class="form-signin-heading">Create a New Alias</h2>

                <div>
                    @Html.LabelFor(m => m.DestinationURL)
                    @Html.TextBoxFor(m => m.DestinationURL, new { @class = "input-block-level", placeholder = "Destination URL" })
                    @Html.ValidationMessageFor(m => m.DestinationURL)
                </div>

                <div>
                    @Html.LabelFor(m => m.ShortURL)
                    @Html.TextBoxFor(m => m.ShortURL, new { @class = "input-block-level", placeholder = "Alias" })
                    @Html.ValidationMessageFor(m => m.ShortURL)
                </div>

                <div>
                    @Html.LabelFor(m => m.Description)
                    @Html.TextAreaFor(m => m.Description, new { @class = "input-block-level", placeholder = "Description" })
                    @Html.ValidationMessageFor(m => m.Description)
                </div>

                <button class="btn btn-large btn-primary" type="submit">Create</button>
        }
    </div><!-- /container -->
</section>

<section class="scripts">

</section>

